<template>
  <a-card>
    <a-button type="primary" icon="plus" @click="addType">{{ $t('user.verification-code.required111566110577253') }}</a-button>
    <DetailsTreeVue/>

    <a-drawer :title="$t('user.verification-code.required111566110577249')" placement="right" :closable="false" :visible="addVisibleDrawer"
      :after-visible-change="afterVisibleChange" :width="500" @close="onClose">
      <a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }" labelAlign="right">
        <a-form-item :label="$t( 'user.verification-code.required111566110577250')">
          <a-input :placeholder="$t( 'user.verification-code.required111566110577250')"></a-input>
        </a-form-item>
        <a-form-item :label="$t('user.verification-code.required111566110577251')">{{ $t('user.verification-code.required111566110577252') }}</a-form-item>
      </a-form>
      <div :style="{
        position: 'absolute',
        right: 0,
        bottom: 0,
        width: '100%',
        borderTop: '1px solid #e9e9e9',
        padding: '10px 16px',
        background: '#fff',
        textAlign: 'center',
        zIndex: 1,
      }">
        <a-button style="margin-right: 8px" @click="onClose">{{ $t('user.email.required11') }}</a-button>
        <a-button type="primary" @click="onClose">{{ $t( 'user.verification-code.required1166') }}</a-button>
      </div>
    </a-drawer>
  </a-card>
</template>

<script>
import DetailsTreeVue from './components/detailsTree.vue'

export default {
  components: {
    DetailsTreeVue
  },
  data () {
    return {
      addVisibleDrawer: false,
    }
  },
  methods: {
    addType () {
      this.addVisibleDrawer = true
    },
    afterVisibleChange(val) {
      console.log('visible', val);
    },
    onClose() {
      this.addVisibleDrawer = false;
    },
  }
}
</script>

<style>

</style>